/**
 *******************************************************************************
 * @file  gpio/gpio_output/source/main.c
 * @brief Main program of GPIO for the Device Driver Library.
 @verbatim
   Change Logs:
   Date             Author          Notes
   2020-06-12       Zhangxl         First version
 @endverbatim
 *******************************************************************************
 * Copyright (C) 2020, Huada Semiconductor Co., Ltd. All rights reserved.
 *
 * This software component is licensed by HDSC under BSD 3-Clause license
 * (the "License"); You may not use this file except in compliance with the
 * License. You may obtain a copy of the License at:
 *                    opensource.org/licenses/BSD-3-Clause
 *
 *******************************************************************************
 */

/*******************************************************************************
 * Include files
 ******************************************************************************/
#include <stdio.h>
#include "app_task.h"
#include "bsp_init.h"
#include "FreeRTOS.h"
#include "task.h"
#include "hc32_ll.h"
/*******************************************************************************
 * Local type definitions ('typedef')
 ******************************************************************************/


/*******************************************************************************
 * Local pre-processor symbols/macros ('#define')
 ******************************************************************************/

/*******************************************************************************
 * Global variable definitions (declared in header file with 'extern')
 ******************************************************************************/

/*******************************************************************************
 * Local function prototypes ('static')
 ******************************************************************************/


/*******************************************************************************
 * Local variable definitions ('static')
 ******************************************************************************/

/*******************************************************************************
 * Function implementation - global ('extern') and local ('static')
 ******************************************************************************/

/**
 * @brief  Main function of GPIO project
 * @param  None
 * @retval int32_t return value, if needed
 */
int main(void)
{    
  LL_PERIPH_WE(LL_PERIPH_ALL);
  BSP_CLK_Init();
  Debug_Uart_Init();
  LL_PERIPH_WP(LL_PERIPH_ALL);
	
  printf("\nSysten Begin \r\n");
	
  BaseType_t xReturn = pdPASS;
  /*Create LED Task*/
  xReturn = xTaskCreate((TaskFunction_t)AppTaskCreate, /*Task Entry*/
                        (const char *)"AppTaskCreate" ,/*task Name*/
                        (uint16_t)128,                 /*Stack size*/
                        (void*)NULL,                   /*Task Parameter*/
                        (BaseType_t)1,                 /*Task Poirity*/
                        (TaskHandle_t*)&AppTaskCreate_Handle); /*Task TCB Pointer*/
  if(pdPASS == xReturn)
  {
    vTaskStartScheduler();
  }
  else
  {
    return -1;
  }
  while(1)
  {
    ;
  }
}

/*******************************************************************************
 * EOF (not truncated)
 ******************************************************************************/
